<?php
	$filename = $_POST['filename'];
	if(isset($_GET['filename']))
		$filename = $_GET['filename'];
	$content = $_POST['content'];

	$handle = fopen($filename, "w+");
	if($handle) {
		if(!fwrite($handle, $content))
			echo 'Save Failed!';
		echo 'Save Successful!';
	}
?>